//
//  AFHTTPSessionManager+In.h
//  Reactive AFNetworking Example
//
//  Created by Robert Widmann on 5/20/14.
//  Copyright (c) 2014 CodaFi. All rights reserved.
//

#import <AFNetworking/AFHTTPSessionManager.h>

@class RACSignal;

@interface AFHTTPSessionManager (In)

/// A convenience around -GET:parameters:success:failure: that returns a cold signal of the
/// resulting JSON object or error.
- (RACSignal *)rac_GET:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

/// A convenience around -HEAD:parameters:success:failure: that returns a cold signal of the
/// resulting JSON object or error.
- (RACSignal *)rac_HEAD:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

/// A convenience around -POST:parameters:success:failure: that returns a cold signal of the
/// result.
- (RACSignal *)rac_POST:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

/// A convenience around -PUT:parameters:success:failure: that returns a cold signal of the
/// resulting JSON object or error.
- (RACSignal *)rac_PUT:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

/// A convenience around -PATCH:parameters:success:failure: that returns a cold signal of the
/// resulting JSON object or error.
- (RACSignal *)rac_PATCH:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

/// A convenience around -DELETE:parameters:success:failure: that returns a cold signal of the
/// resulting JSON object or error.
- (RACSignal *)rac_DELETE:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers;

@end

@interface AFHTTPSessionManager (RequestCustom)

- (RACSignal *)rac_GET:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers customParams:(NSDictionary *)customParams;

- (RACSignal *)rac_POST:(NSString *)path parameters:(NSDictionary *)parameters headers:(NSDictionary *)headers customParams:(NSDictionary *)customParams;

@end
